﻿.select,
.popover-dropdown {
    --bb-dropdown-link-pre-active-bg: #498ff7;
}

.select {
    --bb-select-focus-shadow: none;
    --bb-select-bg: #fff;
    --bb-select-padding: 6px 2.25rem 6px 0.75rem;
    --bb-select-append-width: 30px;
    --bb-select-append-color: #c0c4cc;
    --bb-select-search-padding: 7px 10px;
    --bb-select-search-margin-bottom: .5rem;
    --bb-select-search-border-color: var(--bs-border-color);
    --bb-select-search-padding-right: 30px;
    --bb-select-search-icon-color: var(--bb-select-search-border-color);
    --bb-select-search-icon-right: 18px;
    --bb-select-search-icon-top: 18px;
    --bb-select-search-height: 60px;
}

    .select:not(.cascade) .dropdown-menu {
        overflow-x: hidden;
        width: 100%;
    }

.cascade,
.select {
    --bb-select-dropdown-menu-margin-top: 8px;
}

    .cascade .dropdown-menu,
    .selec .dropdown-menu {
        margin-top: var(--bb-select-dropdown-menu-margin-top) !important;
    }

    .select .form-select {
        background-image: none;
        background-color: var(--bb-select-bg);
        border: 1px solid var(--bs-border-color);
        border-radius: var(--bs-border-radius);
        padding: var(--bb-select-padding);
        cursor: pointer;
    }

        .select .form-select:disabled {
            background-color: var(--bb-disabled-bg);
        }

.dropdown-menu {
    --bs-dropdown-border-radius: var(--bs-border-radius);
    overflow: auto;
    max-height: var(--bb-dropdown-max-height);
}

    .dropdown-menu .dropdown-virtual {
        overflow-y: auto;
        margin: calc(0px - var(--bs-dropdown-padding-y)) var(--bs-dropdown-padding-x);
        max-height: calc(var(--bb-dropdown-max-height) - 2px);
        padding: var(--bs-dropdown-padding-y) var(--bs-dropdown-padding-x);
    }

    .dropdown-menu .search + .dropdown-virtual {
        max-height: calc(var(--bb-dropdown-max-height) - var(--bb-select-search-height));
    }

.dropdown-item {
    cursor: pointer;
}

    .dropdown-item.preActive {
        background-color: var(--bb-dropdown-link-pre-active-bg);
    }

.dropdown-menu-arrow {
    width: 0;
    height: 0;
    border-width: 0 6px 6px;
    border-style: solid;
    border-color: transparent transparent rgba(0,0,0,.15);
    position: absolute;
    left: 20px;
    margin-top: 4px;
    z-index: 1001;
    display: none;
}

    .dropdown-menu-arrow:after {
        content: " ";
        width: 0;
        height: 0;
        border-width: 0 6px 6px;
        border-style: solid;
        border-color: transparent transparent #fff;
        position: absolute;
        top: 1px;
        left: -6px;
    }

.show > .dropdown-menu,
.show > .dropdown-menu-arrow {
    display: block;
}

.form-select:focus {
    box-shadow: var(--bb-select-focus-shadow);
    border-color: var(--bb-border-focus-color);
}

.form-select:not(:disabled):hover {
    border-color: var(--bb-border-hover-color);
}

.form-select.show + .form-select-append i {
    transform: rotate(0);
}

.dropdown-menu[data-popper-placement="bottom-start"].show + .dropdown-menu-arrow,
.dropdown-menu[data-bs-popper="none"].show + .dropdown-menu-arrow {
    display: block;
}

.form-select-append {
    position: absolute;
    height: 100%;
    width: var(--bb-select-append-width);
    right: 0;
    top: 0;
    color: var(--bb-select-append-color);
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .form-select-append i {
        transition: all .3s;
        transform: rotate(180deg);
    }

.show > .form-select-append i {
    transform: rotate(0);
}

.select .clear-icon {
    position: absolute;
    height: 100%;
    width: var(--bb-select-append-width);
    right: 0;
    top: 0;
    color: var(--bb-select-append-color);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    display: none;
}

.select:hover .clear-icon {
    display: flex;
}

.select.cls:hover .form-select-append {
    display: none;
}

.form-select.is-valid:focus,
.was-validated .form-select:valid:focus,
.form-select.is-invalid:focus,
.was-validated .form-select:invalid:focus {
    box-shadow: none;
}

.form-select.is-valid:not([multiple]):not([size]),
.form-select.is-valid:not([multiple])[size="1"],
.was-validated .form-select:valid:not([multiple]):not([size]),
.was-validated .form-select:valid:not([multiple])[size="1"],
.form-select.is-invalid:not([multiple]):not([size]),
.form-select.is-invalid:not([multiple])[size="1"],
.was-validated .form-select:invalid:not([multiple]):not([size]),
.was-validated .form-select:invalid:not([multiple])[size="1"] {
    background-position: right -1rem center, center right 1.5rem;
}

.arrow-danger {
    border-color: transparent transparent var(--bs-danger);
}

.arrow-success {
    border-color: transparent transparent var(--bs-success);
}

.arrow-primary {
    border-color: transparent transparent var(--bs-primary);
}

.arrow-warning {
    border-color: transparent transparent var(--bs-warning);
}

.arrow-info {
    border-color: transparent transparent var(--bs-info);
}

.dropdown-menu .search {
    padding: var(--bb-select-search-padding);
    position: relative;
    border-bottom: 1px solid var(--bb-select-search-border-color);
    margin-bottom: var(--bb-select-search-margin-bottom);
}

    .dropdown-menu .search.is-fixed {
        position: sticky;
        top: calc(-1 * var(--bs-dropdown-padding-y));
        background-color: var(--bs-dropdown-bg);
    }

    .dropdown-menu .search .search-text {
        padding-right: var(--bb-select-search-padding-right);
    }

    .dropdown-menu .search .icon {
        position: absolute;
        right: var(--bb-select-search-icon-right);
        top: var(--bb-select-search-icon-top);
        color: var(--bb-select-search-icon-color);
    }

.select:not(.multi-select) .dropdown-toggle {
    position: relative;
}

.select .dropdown-toggle:after,
.btn-popover-confirm.dropdown-toggle:after {
    content: none;
}
